package com.wnxy.admin.mapper;
import com.wnxy.admin.dto.JChargingPileDto;
import com.wnxy.admin.dto.JChargingStationDto;
import com.wnxy.admin.dto.ReservationChargingStationDto;
import org.apache.ibatis.annotations.Mapper;
import com.wnxy.admin.entity.ChargingStation;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 充电站 Mapper 接口
 * </p>
 *
 * @author All
 * @since 2023-11-29
 */
@Mapper
public interface ChargingStationMapper extends BaseMapper<ChargingStation> {

    List<JChargingStationDto> findAll(String chargingStationName);
    List<JChargingStationDto> findRAll(@Param("chargingStationName") String chargingStationName);

    /**
     * @note 作者：lqc
     * @note 查询电站信息方法
     * */
    List<ReservationChargingStationDto> getAllChargingStationsWithPiles();

    //判断充电站编号是否存在
    @Select("SELECT * FROM t_charging_station WHERE charging_station_number = #{chargingSrationNumber}")
    ChargingStation findByNumbers(String number);
}
